package com.blt.car.me.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

public class RoadCostFragmentAdapter extends FragmentPagerAdapter {

    //过路费明细 充值明细 退款明细
    private final String[] TITLES = {"过路费明细", "充值明细", "退款明细"};

    private ArrayList<Fragment> list;

    public RoadCostFragmentAdapter(FragmentManager fm, ArrayList<Fragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return TITLES[position];
    }

    @Override
    public Fragment getItem(int arg0) {
        return list.get(arg0);
    }

    @Override
    public int getCount() {
        return list.size();
    }

}
